package com.powernobug.service.impl;

import com.powernobug.service.MarketCollectService;
import com.powernobug.bean.model.MarketCollectExample;
import com.powernobug.mapper.MarketCollectMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.AsyncResult;
import org.springframework.stereotype.Service;

import java.util.concurrent.Future;

/**
 * @Author: 肖云戈
 * @CreateTime: 2024-09-02
 * @Description:
 */
@Service
public class MarketCollectServiceImpl implements MarketCollectService {

    @Autowired
    MarketCollectMapper marketCollectMapper;

    @Override
    @Async("globalThreadPool")
    public Future<Integer> getCollectCountByGoodId(Integer id) {
        MarketCollectExample example = new MarketCollectExample();
        example.createCriteria().andValueIdEqualTo(id);

        // 未完成
        return new AsyncResult<>(0);
    }
}
